use serde::Deserialize;

#[derive(Debug, Deserialize)]
pub struct TokenConfig {
    ty: TokenType,
    name: String,
    style: TokenStyle,
    timeout: i64
}

impl TokenConfig {
    pub fn ty(&self) -> &TokenType {
        &self.ty
    }

    pub fn name(&self) -> &String {
        &self.name
    }

    pub fn style(&self) -> &TokenStyle {
        &self.style
    }

    pub fn timeout(&self) -> i64 {
        self.timeout
    }
}

#[derive(Debug, Deserialize)]
pub enum TokenType {
    JWT
}

#[derive(Debug, Deserialize)]
pub enum TokenStyle {
    Uuid,
    SimpleUuid,
    Random32,
    Random64,
    Random128,
    Tik
}